rubydoc: fix sidebar navigation links on nested pages#21589
rubydoc: fix sidebar navigation links on nested pages#21589GunniBusch wants to merge 2 commits intoHomebrew:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Homebrew’s overridden YARD app.js to fix broken sidebar navigation when browsing nested RubyDoc pages (as reported in #21588), and makes minor docstring formatting tweaks in an autogenerated Sorbet RBI.
Changes:
- Add/override YARD template
app.jswith apostMessage-driven navigation handler that fetches and swaps#maincontent for sidebar navigation. - Re-run/adjust parts of the page-init logic after dynamic navigation.
- Minor comment formatting changes in
parser@3.3.8.0.rbi.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| Library/Homebrew/yard/templates/default/fulldoc/html/js/app.js | Overrides YARD JS to handle sidebar navigation on nested pages by resolving URLs and swapping main content. |
| Library/Homebrew/sorbet/rbi/parser@3.3.8.0.rbi | Small docstring formatting changes in an autogenerated RBI file. |
Files not reviewed (1)
- Library/Homebrew/sorbet/rbi/parser@3.3.8.0.rbi: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
This is a lot of extra code added for what should be a relatively simple regression?
@p-linnane does this related to the recent GitHub Pages work perhaps?
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
|
Ok I managed to remove the big app.js file. I overrode https://github.com/lsegal/yard/blob/eddd10c3948021c34a887db403824ce5a892708b/templates/default/layout/html/headers.erb and added The rbi file could be removed, but I could not generate the docs without the correct rbi of parser. |
brew lgtm(style, typechecking and tests) with your changes locally?This fixes #21588
It headers.erb and adds a base tag